package de.traveltainment.concept.envers.updaters;

import de.traveltainment.concept.envers.entities.Vito;
import de.traveltainment.concept.envers.repository.RelationRepository;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import java.util.logging.Logger;

/**
 * Created by borlis on 16.06.2014.
 */
@RequestScoped
public class ConfigurationRelationBuilder {

    @Inject
    private RelationRepository relationRepository;

    @Inject
    private Logger logger;

    public void build(Vito vito, String country) {
        try {
            relationRepository.link(vito, country);
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }

}
